<div class="nav-header">
    <ul class="nav-wrapper">
        {if $path}
        <li class="nav-item">
            <a href="{$go_back}">返回上一级</a>
        </li>
        <li class="nav-item"> | </li>
        {/if}
    </ul>
    <ul class="nav-wrapper nav-center">
        <li class="nav-item nav-item-before">
            <a href="/">全部文件</a>
        </li>

        {volist name="navigation" id="v"}
            <li class="nav-item nav-item-before">
                {switch $v.path|suffix}
                    {case mp3|mp4|m3u8|lxe|php|html|js|less|scss|css|py|c|cpp|txt|md|png|jpeg|jpg}
                        <a href="/index/play?path={$v.path}" title="{$v.file_name}">
                            {$v.file_name}
                        </a>
                    {/case}

                    {default /}
                        <a href="/index/?path={$v.path}" title="{$v.file_name}">
                            {$v.file_name}
                        </a>
                {/switch}
            </li>
        {/volist}
    </ul>
    <ul class="nav-wrapper nav-right">
        <li class="nav-item">
            <p>当前用户: {$user_data['username']}</p>
        </li>
        <!-- <li class="nav-item">
            <div class="add-btn">
                <i class="iconfont">&#xe673;</i>
                <div class="add-wrapper">
                    <p class="create-file">新建文件夹</p>
                    <p class="upload-file">上传文件</p>
                    <p class="upload-folder">上传文件夹</p>
                </div>
            </div>
        </li> -->
    </ul>
</div>
